AWS setting up new account for cli
This is brief guide to set up new account in AWS. As a first step you need to sign-up for AWS services with email id, credit card info etc. Once you have this in place that means you are user of AWS. AWS root user is like high level entity of the infrastructure.
Now we need to start using cli, So first step is to create IAM user from the AWS console. Create a new IAM user with Access Type - Programmatic Access. I am giving a name as cli-user
with full admin access and giving new group name as cli-user-group
.
After this we'll have key and secrets, So we could set environment variables
export AWS_ACCESS_KEY_ID=<some-key> export AWS_SECRET_ACCESS_KEY=<some-secret> export AWS_DEFAULT_REGION=<some-valid-region>
Now test the connectivity
aws iam get-user
If everything works then you'll get some output like this
{ "User": { "Path": "/", "UserName": "cli-user", "UserId": "sdfalsdjlsdajf", "Arn": "arn:aws:iam::4834039404:user/cli-user", "CreateDate": "2021-07-14T10:10:02+00:00" } }